<template>
  <div id="special">
    <div class="special">
      <header>精选专题</header>
      <div class="box">
        <ul>
          <li v-for="(item,i) in special" :key="i">
            <img v-bind:src="item.pic" alt />
            <p v-html="item.title"></p>
            <p v-html="item.descript"></p>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "",
  props:["special"],
  data() {
    return {};
  },
  //生命周期 - 创建完成（访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（访问DOM元素）
  mounted() {}
};
</script>
<style scoped lang="scss">
/* @import url(); 引入css类 */
//精选专题
.special {
  header {
    margin-top: 0.2rem;
    width: 100%;
    background: white;
    text-align: center;
    line-height: 0.8rem;
    font-size: 0.3rem;
    height: 0.8rem;
  }
  .box {
    padding: 0.2rem;
    box-sizing: border-box;
    display: flex;
    background: white;
    overflow-x: scroll;
    overflow-y: hidden;
    ul {
      display: flex;
      li {
        margin-right: 0.2rem;
        height: 100%;
        width: 6.5rem;
        img {
          width: 100%;
          height: 80%;
          border-radius: 0.2rem;
        }
        p:nth-of-type(1) {
          height: 0.8rem;
          line-height: 0.8rem;
        }
        p:nth-of-type(2) {
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          color: gray;
          font-size: 0.2rem;
        }
      }
    }
  }
}
</style>